Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #1532

Merged
merged 33 commits into from
Nov 19, 2023
Merged

Update dependencies #1532

merged 33 commits into from
Nov 19, 2023

Conversation

szg251
Copy link
Contributor

@szg251 szg251 commented Sep 19, 2023

Updated some of the dependencies:

  • easy-ps
  • plutip (transitively haskell-nix, hackage-nix, iohk-nix and CHaP)
  • blockfrost
  • ogmios 5.6 -> 6; response format changed

Blocked by

mlabs-haskell/plutip#183

Pre-review checklist

  • All code has been formatted using our config (make format)
  • Any new API features or modification of existing behavior is covered as defined in our test plan
  • The changelog has been updated under the ## Unreleased header, using the appropriate sub-headings (### Added, ### Removed, ### Fixed), and the links to the appropriate issues/PRs have been included

@szg251 szg251 added the help wanted Extra attention is needed label Sep 19, 2023
@szg251
Copy link
Contributor Author

szg251 commented Sep 19, 2023

Plutip's local-cluster seems to be working correctly, spinning up the cluster with tada distributed, and keys generated.
I could also verify that plutip-server is working, and the cluster can be started with the /start endpoint.
I still have a problem with CTL: it can start the cluster, prepare the wallets, and query them, but it fails with a timeout when it's balancing a tx (before submitting a tx)

@szg251
Copy link
Contributor Author

szg251 commented Sep 21, 2023

Unfortunately I didn't have enough time to finish this, so I pushed my last results to 0fd1270

As discussed in a thread here, the latest versions of cardano-node (8.0.0 and above) require a new version of Ogmios (6.0). This version introduces a lot of breaking changes: most notably, they're using a standard JSON-RPC 2.0 scheme for the websocket messages. There's a beautiful migration guide here:
https://github.com/CardanoSolutions/ogmios/blob/master/architectural-decisions/accepted/017-api-version-6-major-rewrite.md#migration-guide

Last status:

  • renamed JsonWsp modules, data types etc to JsonRpc2
  • modified types and codecs in JsonRpc2 module to comply with the standard
  • updated ogmios most calls (see list below) in /src/Internal/QueryM/Ogmios.purs
  • updated most ogmios request and response types in the same module
  • updated protocol parameters data type
  • updated test schema in /fixtures/schemata/JsonRpc2/UtxoQueryResponse.medea
  • updated generate fixtures file

What's left:

  • finishing call type updates (method names are updated where I could find an equivalent in the new version)
  • verifying/updating error responses
  • finding out the story with stakePool queries: it looks like there's no poolIds query anymore, so a few things might have to change here
call status
querySystemStartCall request, success response
queryCurrentEpochCall request, success response
queryEraSummariesCall request, success response
queryProtocolParameters request, success response
queryChainTipCall request, success response
queryPoolIdsCall -> queryStakePoolsCall method name only
queryPoolParametersCall -
queryDelegationsAndRewards method name only
submitTxCall request, success response
evaluateTxCall request, success response
acquireMempoolSnapshotCall method name only
mempoolSnapshotHasTxCall method name only
mempoolSnapshotNextTxCall method name only
mempoolSnpashotSizeAndCapacityCall method name only
releaseMempoolCall method name only

flake.nix Outdated
Comment on lines 5 to 6
extra-substituters = [ "https://cache.iog.io" ];
extra-trusted-public-keys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines 5 to 7
$property-name "jsonrpc"
$property-schema jsonRpcType
$property-name "method"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you get this new schema from? Did you adapt it by hand?

Comment on lines +14 to +22
hackage-nix = {
url = "github:input-output-hk/hackage.nix";
flake = false;
};
haskell-nix = {
url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.hackage.follows = "hackage-nix";
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these guaranteed to be compatible?

Comment on lines +51 to +60
package cardano-wallet
optimization: False
package cardano-wallet-core
optimization: False
package cardano-wallet-cli
optimization: False
package cardano-wallet-launcher
optimization: False
package cardano-wallet-core-integration
optimization: False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these disabled?

@zmrocze zmrocze requested a review from klntsky November 11, 2023 17:33
@zmrocze
Copy link
Collaborator

zmrocze commented Nov 11, 2023

Thanks @szg251 for the status comment. Definitely helped to finish the pr.

@zmrocze
Copy link
Collaborator

zmrocze commented Nov 11, 2023

@klntsky some easily missable details:

  • I removed tests concerning Ogmios Utxo query. It was obsolete already before, but went unnoticed. If you could double check these are unneeded.
  • removed Ogmios Utxo query fixtures and json schema
  • removed Base64 module - not needed as mempool tx is hex encoded now
  • minor changes to how decoding errors are handled - here im pretty sure behaviour is unchanged

@zmrocze zmrocze marked this pull request as ready for review November 11, 2023 18:20
@klntsky klntsky mentioned this pull request Nov 13, 2023
3 tasks
@klntsky klntsky merged commit b212a58 into develop Nov 19, 2023
3 checks passed
@klntsky klntsky deleted the gergely/update branch November 19, 2023 04:48
# ogmios nixos module (remove and replace with the above after merging and updating)
ogmios-nixos.url = "github:mlabs-haskell/ogmios";
kupo-nixos = {
url = "github:mlabs-haskell/kupo-nixos/6f89cbcc359893a2aea14dd380f9a45e04c6aa67";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the revision I believe.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@szg251 right?

url = "github:input-output-hk/cardano-haskell-packages?ref=repo";
flake = false;
plutip = {
url = "github:mlabs-haskell/plutip/1bf0b547cd3689c727586abb8385c008fb2a3d1c";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason why we fix the revision? @szg251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants